import axios from 'axios'



export const difyPost = async (data) => {
    const response = await axios.post('/v1/chat-messages', {
        "inputs": {},
        "query": data,
        "conversation_id": "",
        "response_mode": "streaming",
        "user": "abc-123",
        "files": ""
    },
        {
            headers: {
                'Content-Type': 'application/json',
                'Authorization ': 'Bearer app-5KVLxDJ1OZ4bxGcakQMB9ffN',
            }
        })
    return response.data
}

// 拦截器
axios.interceptors.response.use(function (response) {
    // 对响应数据做点什么
    return response;
}, function (error) {
    // 对响应错误做点什么
    return Promise.reject(error);
});


